<?php

 $access_token = "PCRGBO2v8w7teTOyxOtnN_zqj6eLCAi9yP6iaZOAiVQxKHc1rUjuBrnZ_7CDfcEesIuPiGJwu8rKaSGlKnYSsYj30jVqPXxwyCG1nnr5WkTPqdsxbW5AaFhGSCk-ZXFVIGTfABAMKX";
 $openid = "oiIL7vzpjY9S-YznZjv-BJhKtR5M";
 $url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=$access_token&openid=$openid&lang=zh_CN";
 $output = https_request($url);
 var_dump($output);
 
 function https_request($url, $data = null)
 {
     $curl = curl_init();     curl_setopt($curl, CURLOPT_URL, $url);
     curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
     curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
     if (!empty($data)){
        curl_setopt($curl, CURLOPT_POST, 1);
         curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
     }
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
     $output = curl_exec($curl);
     curl_close($curl);
     return $output;
 }
 ?>